import pickle


if __name__ == '__main__':

    file_path = "./data.pkl"
    with open(file_path, "rb") as f:
        data = pickle.load(f)

    print(type(data))   # <class 'dict'>
    print(type(data["2010-01-04"])) # pandas dataframe
    print(data["2010-01-04"])   # 输出的是一个交易日的数据

    # 股票 002558.XSHE, 603110.XSHG, 002611.XSHE在部分交易日存在空缺值，清注意处理

    day_info = data["2010-01-04"]
    print(day_info.index)       # 输出各个股票的代码
    print(day_info.columns)